import service from "@/utils/request";

// 登录 2022-05-29 by 幼稚园扛把子
export function Login(data){
    return service(
        {
            url:'api/manager/login',
            method:'post',
            data:data
        }
    )
}

// 获得用户列表 2022-05-29 by 幼稚园扛把子
export function UserList(){
    return service(
        {
            url:'api/manager/userList',
            method:'get',
        }
    )
}

// 获得院线排片 2022-05-30 by 幼稚园扛把子
export function ArrangementList(){
    return service(
        {
            url:'api/manager/arrangementList',
            method:'get',
        }
    )
}

// 获得订单列表 2022-05-30 by 幼稚园扛把子
export function OrderList(){
    return service(
        {
            url:'api/manager/orderList',
            method:'get',
        }
    )
}


// 修改用户密码 2022-05-30 by 幼稚园扛把子
export function updateUserNewPassword(data){
    return service(
        {
            url:'api/manager/updateUserPassword',
            method:'post',
            data:data
        }
    )
}

// 修改员工密码 2022-05-30 by 幼稚园扛把子
export function updateWorkerNewPassword(data){
    return service(
        {
            url:'api/manager/updateWorkerPassword',
            method:'post',
            data:data
        }
    )
}


// 获得所有工作人员信息 2022-06-01 by 幼稚园扛把子
export function getAllWorker(){
    return service(
        {
            url:'api/manager/worker',
            method:'get',
        }
    )
}

// 撤销订单 2022-06-07 by 幼稚园扛把子
export function cancelOrder(oid){
    return service(
        {
            url:'api/manager/cancelOrder?oid='+oid,
            method:'get',
        }
    )
}
// 删除员工 2022-06-07 by 幼稚园扛把子
export function deleteWorker(wid){
    return service(
        {
            url:'api/manager/deleteWorker?wid='+wid,
            method:'get',
        }
    )
}


// 添加客服
export function addWorker(data){
    return service({
        url:'api/manager/addWorker', 
        method:'post',
        data:data
    })
}

// 上传头像
export function uploadAvatar(file){
    return service(
        {
            url:'api/manager/avatar/upload',
            method:'post',
            data:file
        }
    )
}